<?php

declare (strict_types=1);
namespace App\Model;

use App\Library\Common;

/**
 * @property int $id 
 * @property \Carbon\Carbon $created_at 
 * @property \Carbon\Carbon $updated_at 
 * @property string $deleted_at 
 * @property string $name 
 * @property string $url 
 * @property string $logo 
 * @property string $phone 
 * @property string $code 
 * @property int $is_ok 
 */
class Express extends Model
{
    /**
     * The table associated with the model.
     *
     * @var string
     */
    protected $table = 'express';
    /**
     * The attributes that are mass assignable.
     *
     * @var array
     */
    protected $fillable = [];
    /**
     * The attributes that should be cast to native types.
     *
     * @var array
     */
    protected $casts = ['id' => 'integer', 'created_at' => 'datetime', 'updated_at' => 'datetime', 'is_ok' => 'integer'];

    /**
     * 获取完整路径.
     *
     * @param  string  $value
     * @return string
     * get驼峰字段名Attrbute
     */
    public function getLogoAttribute($value)
    {
        return Common::cdnurl2($value);
    }
}